import * as API from './'

export default {
    //登录
    loginIn: (code, params) => {
        return API.POST2(code, '/login/loginNew', params)
    },
    //------Home页 功率
    homePower: (code, params) => {
        return API.POST2(code, '/inverter/getInverterPowerForUser.do', params)
    },
    //发电量
    homeYield: (code, params) => {
        return API.POST2(code, '/inverter/getInverterInfoForUser.do', params)
    },
    //电量图表
    homeYieldCharts: (code, params) => {
        return API.POST2(code, '/mysite/getDiagramDataForUser.do', params)
    },
    //功率图表
    homePowerCharts: (code, params) => {
        return API.POST2(code, '/mysite/getSiteTotalPower.do', params)
    },
    //------Site页 电站列表
    siteList: (code, params) => {
        return API.POST2(code, '/mysite/getPage2', params)
    },
    //获取天气
    getWeather: (code, params) => {
        return API.POST2(code, '/weather/getPdtSiteById.do', params)
    },
    //获取国家，逆变器数量、在线逆变器数量、发电量、二氧化碳减排量
    siteTopData: (code, params) => {
        return API.POST2(code, '/mysite/getSiteInverterInfo.do', params)
    },
    //获取节能数据
    siteEnergySave: (code, params) => {
        return API.POST2(code, '/mysite/electricyPriceIncome.do', params)
    },
    //电量图表
    siteYieldCharts: (code, params) => {
        return API.POST2(code, '/mysite/getYield', params)
    },
    //获取电站下的逆变器列表
    siteInvList: (code, params) => {
        return API.POST2(code, '/mysite/getInverterInfo', params)
    },
    //------Inverter页 逆变器列表
    invList: (code, params) => {
        return API.POST2(code, '/inverter/getPage', params)
    },
    //------Alarm页 告警列表
    alarmList: (code, params) => {
        return API.POST2(code, '/alarm/getAlarmData', params)
    },
    //删除告警
    delectAlarm: (code, params) => {
        return API.POST2(code, '/mysitenew/deleteCustomerAlarmById', params)
    },
    //告警详情
    alarmDetail: (code, params) => {
        return API.POST2(code, '/alarm/getAlarmMsg', params)
    },
    //流动图页面
    getCurrentData: (code, params) => {
        return API.POST2(code, '/mysitenew/getInverterCurrentData.do', params)
    },
    //获取流动图电池信息
    getSiteBatterys: (code, params) => {
        return API.POST2(code, '/mysite/getSiteBatterys', params)
    },
    getFlowChart: (code, params) => {
        return API.POST2(code, '/mysite/getFlowChart', params)
    },
    //获取走向图pv数据
    getPvData: (code, params) => {
        return API.POST2(code, '/mysitenew/getPvData.do', params)
    },
    //查看是否有电表
    getInverterMeterState: (code, params) => {
        return API.POST2(code, '/inverter/getInverterMeterState', params)
    },
    //获取feedin数据
    getGridData: (code, params) => {
        return API.POST2(code, '/mysitenew/getGridData.do', params)
    },
    //获取load数据
    getLoadData: (code, params) => {
        return API.POST2(code, '/mysitenew/getLoadData.do', params)
    },
    //获取电池数据
    getBatteryList: (code, params) => {
        return API.POST2(code, '/mysitenew/getBatteryData.do', params)
    },
    getBatteryData: (code, params) => {
        return API.POST2(code, '/battery/getBatteryData', params)
    },
    getBatteryInfo: (code, params) => {
        return API.POST2(code, '/mysite/getBatteryInfo', params)
    },
    //获取逆变器数据
    getDailyInfo: (code, params) => {
        return API.POST2(code, '/inverter/getInverterState.do', params)
    },
    getYield: (code, params) => {
        return API.POST2(code, '/inverter/getYield.do', params)
    },
    //代理商获取初始化数据
    getCountInfo: (code, params) => {
        return API.POST2(code, '/index/getCountInfo', params)
    },
    getTimeYield: (code, params) => {
        return API.POST2(code, '/index/getTimeYield', params)
    },
    agentGetYield: (code, params) => {
        return API.POST2(code, '/index/getYield', params)
    },
    saleStatistics: (code, params) => {
        return API.POST2(code, '/indexnew/saleStatistics.do', params)
    },
    saleStatisticsByTime: (code, params) => {
        return API.POST2(code, '/index/saleStatisticsByTime', params)
    },
    getAgentPage: (code, params) => {
        return API.POST2(code, '/firm/getAgentPage', params)
    },
    getDevWifiPage: (code, params) => {
        return API.POST2(code, '/devwifi/getPage', params)
    },
    getPageMySite: (code, params) => {
        return API.POST2(code, '/mysite/getPage', params)
    },
    getUserPage: (code, params) => {
        return API.POST2(code, '/login/getUserPage', params)
    },
    //注册时验证wifisn
    vididateWifiSn: (code, params) => {
        return API.POST2(code, '/login/vididateWifiSn.do', params)
    },
    //添加电站、逆变器验证wifisn
    vididateWifiSnAdd: (code, params) => {
        return API.POST2(code, '/mysite/wifiSnIslegal.do', params)
    },
    //获取国家
    selectCountry: (code, params) => {
        return API.POST2(code, '/area/selectCountry.do', params)
    },
    //获取时区
    selectTimeZone: (code, params) => {
        return API.POST2(code, '/timezone/getList', params)
    },
    //登录
    appRegisterOnly: (code, params) => {
        return API.POST2(code, '/login/appRegisterOnly.do', params)
    },
    //根据经纬度获取地址
    getAddr: (code, params) => {
        return API.POST2(code, '/map/getCoordByZipCode.do', params)
    },
    //新增电站
    addSite: (code, params) => {
        return API.POST2(code, '/pdtsite/addPdtSite.do', params)
    },
    //绑定逆变器
    BindSn: (code, params) => {
        return API.POST2(code, '/mysite/addWifi', params)
    },
    //忘记密码
    forget: (code, params) => {
        return API.POST2(code, '/login/forgotPwd', params)
    },
    resetPwd: (code, params) => {
        return API.POST2(code, '/login/resetPwd', params)
    },
    //获取地址（百度地图）
    getAddress: (params) => {
        return API.GET(params)
    },
    alarmGetAlarmMsg: (code, params) => {
        return API.POST2(code, '/alarm/getAlarmMsgNew.do', params)
    },
    mysiteShowAsFirst: (code, params) => {
        return API.POST2(code, '/mysite/showAsFirst', params)
    },
    //充电桩
    //判断电站是否存在充电桩
    existCharger: (code, params) => {
        return API.POST2(code, '/devchargepile/existPile', params)
    },
    //充电桩功率数据
    getSiteCharge: (code, params) => {
        return API.POST2(code, '/devchargepile/getSiteCharge', params)
    },
    //充电桩列表
    getChargerPage: (code, params) => {
        return API.POST2(code, '/devchargepile/getPage', params)
    },
    //充电桩详情页流动图
    getEVdetailChar: (code, params) => {
        return API.POST2(code, '/devchargepile/getFlowChartData', params)
    },
    //充电记录
    getChargerecord: (code, params) => {
        return API.POST2(code, '/devchargerecord/getPage', params)
    },
    //充电电量统计
    getChargerYield: (code, params) => {
        return API.POST2(code, '/devchargeindex/getYield', params)
    },
    //充电桩告警
    getChargerAlarm: (code, params) => {
        return API.POST2(code, '/devchargealarm/getAlarmData', params)
    },
    //充电桩功率 
    getSiteEVTotalChargePower: (code, params) => {
        return API.POST2(code, '/devchargeindex/getSiteTotalChargePower', params)
    },
}